From: Nick Roberts Date: Sat, 19 Sep 2009 11:45:57 +0000 (+0000) Subject: (gdb-var-update-handler-1): Include case of X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~10394 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4f92f11d5c4ef4335a47a8c2d7154115f70846f6;p=emacs.git (gdb-var-update-handler-1): Include case of older GDB where there is no has_more field. --- diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 5c8dc7f304a..831c6fdb0f8 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1149,15 +1149,16 @@ With arg, enter name of variable to be watched in the minibuffer." (var (assoc varnum gdb-var-list)) (new-num (bindat-get-field change 'new_num_children))) (when var - (let ((scope (bindat-get-field change 'in_scope))) + (let ((scope (bindat-get-field change 'in_scope)) + (has-more (bindat-get-field change 'has_more))) (cond ((string-equal scope "false") (if gdb-delete-out-of-scope (gdb-var-delete-1 var varnum) (setcar (nthcdr 5 var) 'out-of-scope))) ((string-equal scope "true") - (setcar (nthcdr 6 var) - (bindat-get-field change 'has_more)) - (when (and (string-equal (nth 6 var) "0") + (setcar (nthcdr 6 var) has-more) + (when (and (or (not has-more) + (string-equal has-more "0")) (not new-num) (string-equal (nth 2 var) "0")) (setcar (nthcdr 4 var)